@extends('Share/home')
<?php
$title='员工管理';
$nav_t='系统管理';
$nav_m='员工管理';
?>
@section('demand-body')
<style>
    /*清除浮动*/
    .clearfix:after{content: "";clear: both;display: block;height: 0;overflow: hidden;}
    .demand-container{width: 100%;background: #fff;}
    .operate-box{width: 1280px;margin: 0 auto;background: #f6f6f6;font-size:14px;padding-bottom: 31px;margin-bottom: 32px;}
    /*造作部分*/
    /*造作--搜索部分*/
    .search-box{width: 100%;overflow: hidden;padding: 30px 0 0 90px;}
    .search-department{float: left;overflow: hidden;}
    .department-hint{float: left;margin-right: 24px;line-height: 32px;}
    .select-style{width: 122px;height: 30px;border: 1px solid #c9c9c9;padding-left: 10px;}
    .search-name{float: left;overflow: hidden;margin-left: 166px;}
    .name-hint{float: left;margin-right: 24px;line-height: 32px;}
    .name-entry{width: 222px;height: 30px;border: 1px solid #c9c9c9;padding-left: 10px;}
    .bt-style{clear: both;display: block;font-size:16px;color: #fff;background: #00a7ea;width: 96px;height: 32px;border: none;cursor: pointer;border-radius: 2px;}
    .search-bt{margin: 48px 0 42px 56px;}
    /*造作--添加部分*/
    .append-prompt{margin-left: 66px;}
    .append-box{padding: 25px 0 0 90px;overflow: hidden;}
    .append-float{float: left;margin-right: 305px;margin-bottom: 15px;}
    .append-float:nth-child(2n){margin-right: 0;}
    .special-float{float: left;margin: 0 266px 15px 0;}
    .prompt-required{color: red;line-height: 32px;}
    .hint-style{float: left;line-height: 32px;margin-right: 24px;}
    .entry-style{width: 222px;height: 30px;border: 1px solid #c9c9c9;padding-left: 10px;}
    .append-select{padding-left: 10px;height: 32px;width: 234px;border: 1px solid #c9c9c9;}
    .append-jurisdiction{float: left;clear: both;width: 100%;}
    .jur-checkbox{}
    .jur-hint{line-height: 30px;}
    .jur-detail{margin: 10px 0;}
    .append-bt{margin-left: 55px;float: left;}
    .cancel-bt{margin-left: 32px;clear: none;float: left;}
    /*展示部分*/
    .show-box{width: 1280px;margin: 0 auto;}
    .entries-item{background: #f6f6f6;}
    .detail-item:nth-child(2n){background: #fbfbfb;}
    .item-style{display: table;width: 1250px;padding-left: 30px;}
    .list-style{vertical-align: middle;display: table-cell;height: 40px;}
    .edit{font-size: 11px;color: #00a7ea;cursor: pointer;margin-right: 7px;}
    .delete{font-size: 11px;color: #00a7ea;cursor: pointer;margin-right: 7px;}
    .modify{font-size: 11px;color: #00a7ea;cursor: pointer;}
    .name-width{width:120px;}
    .department-width{width:120px;}
    .ww-width{width:120px;}
    .mailbox-width{width:140px;}
    .QQ-width{width:125px;}
    .phone-width{width:125px;}
    .vocation-width{width:120px;}
    .work-width{width:125px;}
    .power-width{width:120px;}
    .operate-width{width:135px;}
    /*分页*/
    .page-box{width: 1280px;margin: 0 auto;padding: 20px 0;overflow: hidden;color: #666;}
</style>
<div class="demand-container">
    {{--操作部分--}}
    <div class="operate-box">
        {{--搜索部分--}}
        <form method="post" action="">
            <div class="search-box">
                <div class="search-department clearfix">
                    <p class="department-hint">部门:</p>
                    <select name="ComId" class="select-company select-change select-style">
                        <option value="">请选择</option>
                        @foreach($q_Com_list as $data)
                        <option value="{{$data->id}}">{{$data->Name}}</option>
 
                        @endforeach
                    </select>
                    <select name="DepId"  class="select-department select-change select-style">
                        <option value="">请选择</option>
                      
 
                      
                    </select>
                    <select name="GroupId" class="select-group select-style">
                        <option value="">请选择</option>
                    </select>
                </div>
                <div class="search-name clearfix">
                    <p class="name-hint">姓名:</p>
                    <input  name="Name" value="" class="name-entry" type="text" maxlength="15" />
                </div>
                <input type="submit" class="search-bt bt-style" value="搜索" />
            </div>
        </form>
        {{--添加部分--}}
        <form method="post" action="/system/staff/create">
            <input name="_token" type="hidden" value="{{csrf_token()}}">
            <p class="append-prompt">添加人员</p>
            <div class="append-box">
                {{--姓名--}}
                <div class="append-name special-float clearfix">
                    <p class="title-hint hint-style">姓名:</p>
                    <input name="Name" value="" required="required" class="title-entry entry-style" type="text" maxlength="15" />
                    <span class="prompt-required">*必填</span>
                </div>
                {{--部门--}}
                <div class="append-department clearfix">
                    <p class="branch-hint hint-style">部门:</p>
                    <select name="ComId" class="select-company select-change select-style">
                                @if($Com_list!=NULL)
                               @foreach($Com_list as $data)
                               <option value="{{$data->id}}">{{$data->Name}}</option>
                               @endforeach
                               @else
                               @endif
                    </select>
                    <select name="DepId" class="select-department select-change select-style">
                              
                              @if($Com_list!=NULL)
                               @foreach($Dep_list as $data)
                               <option value="{{$data->id}}">{{$data->Name}}</option>
                               @endforeach
                               @else
                               @endif
                    </select>
                    <select name="GroupId" class="select-group select-style">
                               @if($Dep_list!=NULL)
                               @foreach($Group_list as $data)
                               <option value="{{$data->id}}">{{$data->Name}}</option>
                               @endforeach
                               @else
                               @endif
                    </select>
                </div>
                {{--旺旺--}}
                <div class="append-ww special-float clearfix">
                    <p class="ww-hint hint-style">旺旺:</p>
                    <input name="WW" value="" required class="ww-entry entry-style" type="text" maxlength="15" />
                    <span class="prompt-required">*必填</span>
                </div>
                {{--邮箱--}}
                <div class="append-mailbox special-float clearfix">
                    <p class="mailbox-hint hint-style">邮箱:</p>
                    <input name="Email" value="" class="mailbox-entry entry-style" required="required" type="text" maxlength="15" />
                    <span class="prompt-required">*必填</span>
                </div>
                {{--QQ--}}
                <div class="append-QQ append-float clearfix">
                    <p class="QQ-hint hint-style">Q Q:</p>
                    <input name="QQ" value="" class="QQ-entry entry-style" type="text" maxlength="15" />
                </div>
                {{--手机--}}
                <div class="append-phone special-float clearfix">
                    <p class="phone-hint hint-style">手机:</p>
                    <input  name="Mobile" value="" required="required" class="phone-entry entry-style" type="text" maxlength="15" />
                    <span class="prompt-required">*必填</span>
                </div>
                {{--分机--}}
                <div class="append-extension append-float clearfix">
                    <p class="extension-hint hint-style">分机:</p>
                    <input name="call" value="" class="extension-entry entry-style" type="text" maxlength="15" />
                </div>
                {{--提成比例--}}
                <div class="append-percentage append-float clearfix">
                    <p class="percentage-hint hint-style">提成:</p>
                    <input name="Commission" value="" class="percentage-entry entry-style" type="text" maxlength="15" />
                </div>
                {{--职务--}}
                <div class="append-duties append-float clearfix">
                    <p class="duties-hint hint-style">职务:</p>
                    <select name="" class="select-duties append-select">
                        <option value="RoleId">请选择</option>
                            @foreach($Role as $data)
                        <option value="{{$data->id}}">{{$data->Name}}</option>
                         @endforeach
                    </select>
                </div>
                {{--工种--}}
                <div class="append-work append-float clearfix">
                    <p class="work-hint hint-style">工种:</p>
                    <select name="Type" class="select-work append-select">
                         <option value="">请选择</option>
                            @foreach($Type as $data)
                        <option value="{{$data->id}}">{{$data->Name}}</option>
                            @endforeach
                    </select>
                </div>
 
                {{--权限--}}
                <div class="append-jurisdiction">
                    <input class="jur-checkbox" type="checkbox" name="" value="">
                    <span class="jur-hint">权限A</span><p class="jur-detail">1.创建通讯录(只限公司人员)。2.添加业务方。3.审核需求。4.分配需求。5.修改需求。6.添加需求负责人。7.查看本部门内所有需求</p>
                    <input class="jur-checkbox" type="checkbox" name="" value="">
                    <span class="jur-hint">权限B</span><p class="jur-detail">1.添加发布单位，创建，绑定合同，添加供应商。2.待经理审核进行审核，进行业绩分配。2.待经理审核进行审核，进行业绩分配。3.提成审核，分配。4.查看整个公司部门内所有需求</p>
                    <input class="jur-checkbox" type="checkbox" name="" value="">
                    <span class="jur-hint">权限C</span><p class="jur-detail">1.标记提交结算，导出结算表格，标记已结算。2.结算周期修改。3.查看本公司内所有需求</p>
                    <input class="jur-checkbox" type="checkbox" name="" value="">
                    <span class="jur-hint">权限D</span><p class="jur-detail">1.创建异常结算条。2.标记和业务方结算状态。3.标记提成已发放状态。4.标记已开票状态。5.导出提成表。6.查看本公司内所有需求</p>
                </div>
                <div class="append-button">
                    <input type="submit" class="append-bt bt-style" value="添加" />
                    <input type="reset" class="cancel-bt bt-style" value="取消" />
                </div>
            </div>
               @foreach ($errors->all() as $error)
                <p class="error">{{ $error }}</p>
                @endforeach
        </form>
               
    </div>
    {{--展示部分--}}
    <div class="show-box">
        {{--条目--}}
        <div class="show-entries">
            <ul class="entries-item item-style">
                <li class="entries-list list-style name-width">姓名</li>
                <li class="entries-list list-style department-width">部门</li>
                <li class="entries-list list-style ww-width">旺旺</li>
                <li class="entries-list list-style mailbox-width">邮箱</li>
                <li class="entries-list list-style QQ-width">Q Q</li>
                <li class="entries-list list-style phone-width">手机</li>
                {{--<li class="entries-list list-style extension-width">分机</li>
                <li class="entries-list list-style deduct-width">提成</li>--}}
                <li class="entries-list list-style vocation-width">职业</li>
                <li class="entries-list list-style work-width">工种</li>
                <li class="entries-list list-style power-width">权限</li>
                <li class="entries-list list-style operate-width">操作</li>
            </ul>
        </div>
        {{--细目--}}
        <div class="show-detail">
            <ul class="detail-item item-style" itemId="">
                <li class="detail-list list-style name-width">a</li>
                <li class="detail-list list-style department-width">b</li>
                <li class="detail-list list-style ww-width">汪忠棠_全速</li>
                <li class="detail-list list-style mailbox-width">1012563306@qq.com</li>
                <li class="detail-list list-style QQ-width">1012563306</li>
                <li class="detail-list list-style phone-width">18405814736</li>
                <li class="detail-list list-style vocation-width">i</li>
                <li class="detail-list list-style work-width">j</li>
                <li class="detail-list list-style power-width">k</li>
                <li class="detail-list list-style operate-width">
                    <span class="edit">编辑</span><span class="delete">删除</span><span class="modify">重置密码</span>
                </li>
            </ul>
            <ul class="detail-item item-style" itemId="">
                <li class="detail-list list-style name-width">a</li>
                <li class="detail-list list-style department-width">b</li>
                <li class="detail-list list-style ww-width">c</li>
                <li class="detail-list list-style mailbox-width">d</li>
                <li class="detail-list list-style QQ-width">e</li>
                <li class="detail-list list-style phone-width">f</li>
                <li class="detail-list list-style vocation-width">i</li>
                <li class="detail-list list-style work-width">j</li>
                <li class="detail-list list-style power-width">k</li>
                <li class="detail-list list-style operate-width">
                    <span class="edit">编辑</span><span class="delete">删除</span><span class="modify">重置密码</span>
                </li>
            </ul>
        </div>
    </div>
</div>
<script>
    /*ie9的兼容*/
    var testElement=document.createElement('input');
    var requiredSupported='required' in testElement&&!/Version\/[\d\.]+\s*Safari/i.test(navigator.userAgent);
    if(!requiredSupported){
        document.getElementsByTagName('form')[1].onsubmit=function(e){
            var inputs=document.getElementsByTagName('input');
            for(var n=0;n<inputs.length;n++){
                var input=inputs[n];
                var placeholder='必填字段';//input.placeholder?input.placeholder:input.getAttribute('placeholder');
//                if(!placeholder) continue;
                    if(!input.value||(input.value==placeholder)){
                    alert('请填写'+placeholder);
                    e=e||window.event;
                    e.preventDefault&&e.preventDefault();
                    e.returnValue=false;
                    break;
                }
            }
        };
    };
</script>
@endsection